home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / bbs_util / bsrc_260.zip / SRC.ZIP / B_TODAY.C < prev    next >
C/C++ Source or Header  |  1996-02-20  |  5KB  |  127 lines

  1. /*--------------------------------------------------------------------------*/
  2. /*                                                                          */
  3. /*                                                                          */
  4. /*      ------------         Bit-Bucket Software, Co.                       */
  5. /*      \ 10001101 /         Writers and Distributors of                    */
  6. /*       \ 011110 /          Freely Available<tm> Software.                 */
  7. /*        \ 1011 /                                                          */
  8. /*         ------                                                           */
  9. /*                                                                          */
  10. /*              (C) Copyright 1987-96, Bit Bucket Software Co.              */
  11. /*                                                                          */
  12. /*            This module was originally written by Bob Hartman             */
  13. /*                                                                          */
  14. /*                  BinkleyTerm Initial Fullscreen Setup                    */
  15. /*                                                                          */
  16. /*                                                                          */
  17. /*    For complete  details  of the licensing restrictions, please refer    */
  18. /*    to the License  agreement,  which  is published in its entirety in    */
  19. /*    the MAKEFILE and BT.C, and also contained in the file LICENSE.260.    */
  20. /*                                                                          */
  21. /*    USE  OF THIS FILE IS SUBJECT TO THE  RESTRICTIONS CONTAINED IN THE    */
  22. /*    BINKLEYTERM  LICENSING  AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF    */
  23. /*    THIS  AGREEMENT IN ANY OF THE  AFOREMENTIONED FILES,  OR IF YOU DO    */
  24. /*    NOT HAVE THESE FILES,  YOU  SHOULD  IMMEDIATELY CONTACT BIT BUCKET    */
  25. /*    SOFTWARE CO.  AT ONE OF THE  ADDRESSES  LISTED BELOW.  IN NO EVENT    */
  26. /*    SHOULD YOU  PROCEED TO USE THIS FILE  WITHOUT HAVING  ACCEPTED THE    */
  27. /*    TERMS  OF  THE  BINKLEYTERM  LICENSING  AGREEMENT,  OR  SUCH OTHER    */
  28. /*    AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO.      */
  29. /*                                                                          */
  30. /*                                                                          */
  31. /* You can contact Bit Bucket Software Co. at any one of the following      */
  32. /* addresses:                                                               */
  33. /*                                                                          */
  34. /* Bit Bucket Software Co.        FidoNet  1:104/501, 1:343/491             */
  35. /* P.O. Box 460398                AlterNet 7:42/1491                        */
  36. /* Aurora, CO 80046               BBS-Net  86:2030/1                        */
  37. /*                                Internet f491.n343.z1.fidonet.org         */
  38. /*                                                                          */
  39. /* Please feel free to contact us at any time to share your comments about  */
  40. /* our software and/or licensing policies.                                  */
  41. /*                                                                          */
  42. /*--------------------------------------------------------------------------*/
  43.  
  44. /* Include this file before any other includes or defines! */
  45.  
  46. #include "includes.h"
  47.  
  48. void 
  49. do_today ()
  50. {
  51.     char j[30];
  52.     ADDR tmp;
  53.  
  54.     if (fullscreen)
  55.     {
  56.  
  57.         (void) sprintf (j, "%d/%d", hist.bbs_calls, hist.mail_calls);
  58.         (void) sprintf (junk, "%-8.8s", j);
  59.         sb_move (historywin, HIST_BBS_ROW, 2);
  60.         sb_puts (historywin, MSG_TXT (M_BBS_MAIL));
  61.         sb_puts (historywin, junk);
  62.  
  63.         (void) sprintf (junk, "%-6d", hist.calls_made);
  64.         sb_move (historywin, HIST_ATT_ROW, 2);
  65.         sb_puts (historywin, MSG_TXT (M_CALLS_OUT));
  66.         sb_puts (historywin, junk);
  67.  
  68.         (void) sprintf (j, "%d/%ld", hist.connects, hist.callcost);
  69.         (void) sprintf (junk, "%-8.8s", j);
  70.         sb_move (historywin, HIST_CONN_ROW, 2);
  71.         sb_puts (historywin, MSG_TXT (M_GOOD_COST));
  72.         sb_puts (historywin, junk);
  73.  
  74.         (void) sprintf (j, "%d/%d", hist.files_in, hist.files_out);
  75.         (void) sprintf (junk, "%-8.8s", j);
  76.         sb_move (historywin, HIST_FILE_ROW, 2);
  77.         sb_puts (historywin, MSG_TXT (M_FILES_IO));
  78.         sb_puts (historywin, junk);
  79.  
  80.         sb_move (historywin, HIST_LAST_ROW, 2);
  81.         sb_puts (historywin, MSG_TXT (M_LAST));
  82.         sb_puts (historywin, MSG_TXT (M_LAST));
  83.     }
  84.     tmp = hist.last_addr;
  85.     tmp.Domain = NULL;
  86.     last_type (hist.last_caller, &tmp);
  87. }
  88.  
  89. void 
  90. bottom_line ()
  91. {
  92.     if (fullscreen)
  93.     {
  94.         sb_move (wholewin, (short) (SB_ROWS - 1), 0);
  95.         (void) sb_putc (wholewin, ' ');
  96.         sb_puts (wholewin, ANNOUNCE);
  97. #ifdef OVERLAYS
  98.         sb_puts (wholewin, "-Overlay");
  99. #endif
  100.         sb_puts (wholewin, COMPILER_NAME);
  101.         if (serial == -1)
  102.             sb_puts (wholewin, MSG_TXT (M_UNREGISTERED));
  103.         sb_move (wholewin, (short) (SB_ROWS - 1), (short) (SB_COLS - 23));
  104.         sb_puts (wholewin, MSG_TXT (M_ALTF10));
  105.     }
  106. }
  107.  
  108. void 
  109. put_up_time ()
  110. {
  111.     struct tm *tp;
  112.     time_t ltime;
  113.  
  114.     if (fullscreen && (un_attended || doing_poll))
  115.     {
  116.         (void) time (<ime);
  117.         tp = localtime (<ime);
  118.  
  119.         (void) sprintf (junk, "%s %s %02d @ %02d:%02d",
  120.             wkday[tp->tm_wday], mtext[tp->tm_mon], tp->tm_mday,
  121.             tp->tm_hour, tp->tm_min);
  122.         sb_move (settingswin, SET_TIME_ROW, SET_TIME_COL);
  123.         sb_puts (settingswin, junk);
  124.         sb_show ();
  125.     }
  126. }
  127.